package org.song.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.song.mapper.UserMapper;
import org.song.model.entity.UserEntity;
import org.song.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Service;

@Slf4j
@Service( value = "userServiceImpl")
public class UserServiceImpl  implements UserService {

    @Autowired( required = true )
    @Qualifier( value = "userMapper")
    private UserMapper userMapper;

    @Override
    public int deleteUser( @NonNull UserEntity userEntity) {
        return userMapper.deleteUser(userEntity);
    }

    @Override
    public int insertUser( @NonNull UserEntity userEntity) {
        return userMapper.insertUser(userEntity);
    }

    @Override
    public int updateUser( @NonNull UserEntity userEntity) {
        return userMapper.updateUser(userEntity);
    }


}
